package ar.edu.unsam.algo3.plantasvszombies.wicket

import ar.edu.unsam.algo3.plantasvszombies.dominio.JardinZen
import ar.edu.unsam.algo3.plantasvszombies.dominio.Mejora
import ar.edu.unsam.algo3.plantasvszombies.dominio.Zombie
import ar.edu.unsam.algo3.plantasvszombies.homes.HomeMejoras
import ar.edu.unsam.algo3.plantasvszombies.homes.HomePlantas
import ar.edu.unsam.algo3.plantasvszombies.homes.HomeZombies
import org.apache.wicket.protocol.http.WebApplication
import org.uqbar.commons.utils.ApplicationContext

/**
 * Application object for your web application. If you want to run this application without deploying, run the Start class.
 * 
 * @see ar.edu.unsam.algo3.plantasvszombies.wicket.Start#main(String[])
 */
class WicketApplication extends WebApplication {

	override getHomePage() {
		HomePage
	}

	override init() {
		ApplicationContext::instance.configureSingleton(typeof(Zombie), new HomeZombies)
		ApplicationContext::instance.configureSingleton(typeof(JardinZen), new HomePlantas)
		ApplicationContext::instance.configureSingleton(typeof(Mejora), new HomeMejoras)

		resourceSettings.addResourceFolder("src/main/pages/ar/edu/unsam/algo3/plantasvszombies/wicket")

		debugSettings.ajaxDebugModeEnabled = false
		markupSettings.stripWicketTags = true

		super.init
	}
}
